<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    ul {
      list-style: none;
      width: 200px;
      margin: 0 auto;
    }

    li {
      display: block;
      width: 200px;
      height: 200px;
      border: 1px saddlebrown solid;
      margin: 20px 0 0 0;
    }

    .bottom {
      width: 20px;
      margin: 0 auto;
    }

    img {
      width: 20px;
    }
  </style>
</head>

<body>
  <ul id="context">
    <li>1i</li>
    <li>2i</li>
    <li>3i</li>
    <li>4i</li>
    <li>5i</li>
    <li>6i</li>
    <li>7i</li>
    <li>8i</li>
    <li>9i</li>
    <li>10i</li>
  </ul>
  <div class="bottom" id="bottom"> <img
      src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3281904817,1077646612&fm=26&gp=0.jpg" alt=""></div>

  <script>
    let context = document.getElementById("context");
    let bottom = document.getElementById("bottom");
    let lis = document.querySelectorAll('li')
    const observer = new IntersectionObserver(nodes => {
      const tgt = nodes[0]; // 反正只有一个
      if (tgt.isIntersecting) {
        context = document.getElementById("context");
        bottom = document.getElementById("bottom");
        lis = document.querySelectorAll('li')

        let con = context.innerHTML,
          newCon = '';
        let i = lis.length
        for (let index = i + 1; index <= i + 5; index++) {
          newCon += `<li>i${index}</li>`
        }
        context.innerHTML = con + newCon
      }
    })
    observer.observe(bottom);
  </script>
</body>

</html>